public class DefaultTestContextBootstrapper extends AbstractTestContextBootstrapper
TestContextBootstrapper
SPI.
TestExecutionListeners
:
DelegatingSmartContextLoader
as the default ContextLoader
.
MergedContextConfiguration
.
Modifier and Type | Field and Description |
---|---|
private static java.util.List<java.lang.String> |
DEFAULT_TEST_EXECUTION_LISTENER_CLASS_NAMES |
Constructor and Description |
---|
DefaultTestContextBootstrapper() |
Modifier and Type | Method and Description |
---|---|
protected MergedContextConfiguration |
buildMergedContextConfiguration(java.lang.Class<?> testClass,
java.lang.String[] locations,
java.lang.Class<?>[] classes,
java.util.Set<java.lang.Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>> initializerClasses,
java.lang.String[] activeProfiles,
ContextLoader contextLoader,
CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate,
MergedContextConfiguration parentConfig)
Builds a standard
MergedContextConfiguration . |
protected java.lang.Class<? extends ContextLoader> |
getDefaultContextLoaderClass(java.lang.Class<?> testClass)
Returns
DelegatingSmartContextLoader . |
protected java.util.List<java.lang.String> |
getDefaultTestExecutionListenerClassNames()
Returns an unmodifiable list of fully qualified class names for the following
default
TestExecutionListeners :
DependencyInjectionTestExecutionListener
DirtiesContextTestExecutionListener
TransactionalTestExecutionListener
SqlScriptsTestExecutionListener
|
buildMergedContextConfiguration, getBootstrapContext, getDefaultTestExecutionListenerClasses, getTestExecutionListeners, setBootstrapContext
private static final java.util.List<java.lang.String> DEFAULT_TEST_EXECUTION_LISTENER_CLASS_NAMES
protected java.util.List<java.lang.String> getDefaultTestExecutionListenerClassNames()
TestExecutionListeners
:
getDefaultTestExecutionListenerClassNames
in class AbstractTestContextBootstrapper
TestExecutionListener
classesprotected java.lang.Class<? extends ContextLoader> getDefaultContextLoaderClass(java.lang.Class<?> testClass)
DelegatingSmartContextLoader
.getDefaultContextLoaderClass
in class AbstractTestContextBootstrapper
testClass
- the test class for which to retrieve the default
ContextLoader
classprotected MergedContextConfiguration buildMergedContextConfiguration(java.lang.Class<?> testClass, java.lang.String[] locations, java.lang.Class<?>[] classes, java.util.Set<java.lang.Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>> initializerClasses, java.lang.String[] activeProfiles, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parentConfig)
MergedContextConfiguration
.buildMergedContextConfiguration
in class AbstractTestContextBootstrapper
testClass
- the test class for which the MergedContextConfiguration
should be built (must not be null
)locations
- the merged resource locationsclasses
- the merged annotated classesinitializerClasses
- the merged context initializer classesactiveProfiles
- the merged active bean definition profilescontextLoader
- the resolved ContextLoader
cacheAwareContextLoaderDelegate
- the cache-aware context loader delegate
to be provided to the instantiated MergedContextConfiguration
parentConfig
- the merged context configuration for the parent application
context in a context hierarchy, or null
if there is no parentMergedContextConfiguration